package com.sansecy.progressbar;

import android.graphics.Paint;

/**
 * @Description TODO
 * @Date 2019-08-09 06:11
 * @Created by caoyu
 */
public class PaintUtils {
    public static float getBaseLine(Paint.FontMetrics fontMetrics, float centerY) {
        return centerY + (fontMetrics.bottom - fontMetrics.top) / 2 - fontMetrics.bottom;
    }

    public static int getBaseLine(Paint.FontMetricsInt fontMetrics, int centerY) {
        return centerY + (fontMetrics.bottom - fontMetrics.top) / 2 - fontMetrics.bottom;
    }
}
